﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sinacor.UI.Bovespa.Ordens.Communication.Bovespa.Cliente.Cliente;
using Sinacor.UI.Bovespa.Ordens.Model;
using Sinacor.Infra.UI.Common;
using Sinacor.Infra.Common;

namespace Sinacor.UI.Bovespa.Ordens.Communication.Translator
{
    class TranslatorPosicaoContasCorrente : 
        BaseTranslator<Model.PosicaoContasCorrente, 
        PosicaoContasCorrenteResponse, 
        ModelCollection<Model.PosicaoContasCorrente>,
        List<PosicaoContasCorrenteResponse>>
{
public override Model.PosicaoContasCorrente Translate(PosicaoContasCorrenteResponse from)
{
    Model.PosicaoContasCorrente to = new PosicaoContasCorrente();
    if (from != null)
    {
        to.ContasCorrente = new TranslatorContasCorrente().TranslateToList(from.ContasCorrente);
        to.DataPosicao = from.DataPosicao;
    }
    return to;
}
}
}